package com.kitty.game.equip.service;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.ServerService;
import com.kitty.game.chat.service.ChatService;
import com.kitty.game.config.NPC;
import com.kitty.game.npc.NpcDataPool;
import com.kitty.game.npc.message.RespNpcContent;
import com.kitty.game.npc.model.NpcButton;
import com.kitty.game.role.model.Role;
import com.kitty.game.role.service.AccountService;
import com.kitty.game.role.service.RoleService;
import org.nutz.dao.Dao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QMGService {
    @Autowired
    ServerService serverService;
    @Autowired
    FabaoService fabaoService;
    @Autowired
    RoleService roleService;
    @Autowired
    ChatService chatService;
    @Autowired
    AccountService accountService;
    @Autowired
    Dao dao;
    Logger logger = LoggerFactory.getLogger(QMGService.class);

    public void init() {
        NpcDataPool.npcButtonHandlers.put("getLuoBoTaiZiTask", (npcButtonParam) -> {
            ((QMGService) SpringUtils.getBean(QMGService.class)).luoboTask(npcButtonParam.getRole(), npcButtonParam.getNpc(), "getLuoBoTaiZiTask");
        });
        NpcDataPool.npcButtonHandlers.put("submitLuoBoTaiZiTask", (npcButtonParam) -> {
            ((QMGService)SpringUtils.getBean(QMGService.class)).luoboTask(npcButtonParam.getRole(), npcButtonParam.getNpc(), "submitLuoBoTaiZiTask");
        });
    }

    private void luoboTask(Role role, NPC npc, String key) {
        this.logger.error(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
    }

    public String point(NPC npc, Role role, RespNpcContent respNpcContent) {
        String tail = "我是变脸王，我喜爱变身，我更喜欢很多人一起变身！" + NpcButton.QMG_LB_TASK.getKey() + NpcButton.QMG_LB_TASK_END.getKey() + "[离开]";
        return tail;
    }
}
